<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <div class="layui-form-item">
            <label class="layui-form-label required">权限名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" readonly class="layui-input" value="{$row.name|default=''}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">商机权限</label>
            <div class="layui-input-block">
                {foreach customer_auth_list as $key=>$val}
                    <input type="checkbox" name="customer_auth[{$key}]" lay-skin="primary" title="{$val}"  {if in_array($key,$row.customer_auth)}checked="" {/if}>
                {/foreach}
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">商品权限</label>
            <div class="layui-input-block">
                {foreach customer_goods_auth_list as $key=>$val}
                <input type="checkbox" name="customer_goods_auth[{$key}]" lay-skin="primary" title="{$val}"  {if in_array($key,$row.customer_goods_auth)}checked="" {/if}>
                {/foreach}
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">订单权限</label>
            <div class="layui-input-block">
                {foreach order_goods_auth_list as $key=>$val}
                <input type="checkbox" name="order_goods_auth[{$key}]" lay-skin="primary" title="{$val}"  {if in_array($key,$row.order_goods_auth)}checked="" {/if}>
                {/foreach}
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>

    </form>
</div>

<!--<script type="text/javascript">-->
<!--    layui.use('form',function(){-->
<!--        const form = layui.form;-->
<!--        form.render();-->
<!--    });-->
<!--</script>-->